const { defineConfig } = require("@vue/cli-service");
const bundleAnalyzer = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false, //关闭eslint语法检测
  css: {
    loaderOptions: {
      postcss: {
        postcssOptions: {
          plugins: [
            require("postcss-pxtorem")({
              rootValue: 37.5,
              propList: ["*"],
              selectorBlackList: [".norem"],
            }),
          ],
        },
      },
    },
  },
  devServer: {
    host: "localhost",
    port: 8083,
    hot: true,
    https: false,
    // proxy: {
    //   //配置代理
    //   "/testIp": {
    //     target: "http://154.8.224.206:8081",
    //     changeOrigin: true,
    //     ws: true, //websocket支持
    //     secure: false,
    //     pathRewrite: {
    //       "^/testIp": "/",
    //     },
    //   }
    // },
  },
  configureWebpack: (config) => {
    config.plugins.push(new bundleAnalyzer());
  },
});
